/**
 *  @file TypeInfo.h
 */
#ifndef _TYPEINFO_H_
#define _TYPEINFO_H_

#include "../common/BaseObject.h"
#include "../text/CFString.h"
#include <typeinfo>

namespace cppflib
{

namespace lang
{

/**
 *  Just a class to contain the name of another class
 */
class _DLLAPI TypeInfo : public BaseObject
{
private:
    CFString name;

private:
    TypeInfo(void);

public:
    const TypeInfo& operator=(const TypeInfo& t);    

public:
    TypeInfo(const CFString & typeName);
#if defined(WIN32)
    TypeInfo(const type_info & typeInfo);
#elif defined(linux)
    TypeInfo(const std::type_info & typeInfo);
#endif
    virtual ~TypeInfo(void);

    const CFString & GetName() const;
    bool IsTypeOf(const TypeInfo & t) const;
    bool IsTypeOf(const CFString & typeName) const;
#if defined(WIN32)
    bool IsTypeOf(const type_info & typeInfo) const;
#elif defined(linux)
    bool IsTypeOf(const std::type_info & typeInfo) const;
#endif
    
};

bool operator==(const TypeInfo& t1, const TypeInfo& t2);
bool operator!=(const TypeInfo& t1, const TypeInfo& t2);

}  // end of namespace lang

}  // end of namespace cppflib


#endif
